
INCLUDE_DIR=


#子目录的Makefile直接读取其子目录就行
SUBDIRS=$(shell ls -l | grep ^d | awk '{print $$9}')


all : ${BIN_DIR}/boot.bin

$(OBJS_DIR)/%.o : %.c ${INCLUDE_DIR}
	${CC} ${INCLUDE_DIR} ${CFLAGS} $< -o $@

$(OBJS_DIR)/%.o : %.cpp ${INCLUDE_DIR}
	${CC} ${INCLUDE_DIR} ${CFLAGS} $< -o $@


$(OBJS_DIR)/%.o: %.asm
	${NASM} $< -f elf32 -o $@


$(BIN_DIR)/%.bin: %.asm
	${NASM} $< -f bin -o $@